package com.newtouch.bxzs.business.train.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.newtouch.bxzs.business.train.model.bo.KnowledgeBaseBO;
import com.newtouch.bxzs.business.train.model.vo.KnowledgeBaseVO;
import com.newtouch.bxzs.business.train.model.vo.NewKnowledgeBaseVO;

import java.util.List;

/**
 * 知识库业务逻辑
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/11 9:34</td>
 * <td>lingshouyi</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author lingshouyi
 * @version 1.0.0
 * @since 1.0.0
 */
public interface KnowledgeBaseService {

    /**
     * 查询知识库列表信息
     *
     * @param knowledgeBaseVO 查询条件
     * @param flag            标识 2,app端
     * @return 知识库列表
     */
    IPage<KnowledgeBaseBO> getKnowledgeBaseList(KnowledgeBaseVO knowledgeBaseVO, Boolean flag);

    /**
     * 查看知识详情
     *
     * @param knowledgeBaseId 知识id
     * @return 知识详情
     */
    KnowledgeBaseBO getKnowledgeBaseDetail(String knowledgeBaseId);

    /**
     * 新增或者修改知识库
     *
     * @param newKnowledgeBaseVO 录入项
     * @return 新增返回当前新增的知识库ID
     */
    String modifyKnowledgeBase(NewKnowledgeBaseVO newKnowledgeBaseVO);

    /**
     * 发布或撤销知识库
     *
     * @param knowledgeBaseId 传入知识库ID
     * @param publishStatus   状态
     */
    Integer changeKnowledgeBaseState(String knowledgeBaseId, String publishStatus);

    /**
     * 逻辑删除或者逻辑批量删除知识库
     *
     * @param knowledgeBaseIds 知识库Id集合
     */
    Integer deleteKnowledgeBase(List<String> knowledgeBaseIds);
}
